<template>
  <div class="params-box">
    <form-item :formList="formList"></form-item>
    <icons-dialog
      :visible.sync="iconsVisible"
      :current="options[currentIconModel]"
      @select="setIcon"
    />
  </div>
</template>
<script>
import IconsDialog from '@/components/IconsDialog';
import common from '../mixin';
import { inputList } from './formList';
export default {
  name: 'inputTool',
  mixins: [common],
  components: {
    IconsDialog
  },
  data() {
    return {
      iconsVisible: false,
      currentIconModel: '',
      formList: inputList
    };
  },
  methods: {
    setIcon(val) {
      this.options[this.currentIconModel] = val;
    },
    openIconsDialog(model) {
      this.iconsVisible = true;
      this.currentIconModel = model;
    }
  }
};
</script>
